package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName sys_grp
 */
@TableName(value ="sys_grp")
@Data
public class SysGrp implements Serializable {
    /**
     * 组ID
     */
    @TableId
    private String grpid;

    /**
     * 组名称
     */
    private String grpname;

    /**
     * 管理组
     */
    private String grpmgr;

    /**
     * 组类型
     */
    private Integer type;

    /**
     * 组描述
     */
    private String grpdsc;

    /**
     * 组级别
     */
    private String grplevel;

    /**
     * 父级组ID
     */
    private String parentid;

    /**
     * 所属租户
     */
    private String tenantid;

    /**
     * 状态 0：无效，1：有效
     */
    private String status;

    /**
     * 创建时间
     */
    private Date crdt;

    /**
     * 创建人
     */
    private String crusr;

    /**
     * 修改时间
     */
    private Date mddt;

    /**
     * 修改人
     */
    private String mdusr;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysGrp other = (SysGrp) that;
        return (this.getGrpid() == null ? other.getGrpid() == null : this.getGrpid().equals(other.getGrpid()))
            && (this.getGrpname() == null ? other.getGrpname() == null : this.getGrpname().equals(other.getGrpname()))
            && (this.getGrpmgr() == null ? other.getGrpmgr() == null : this.getGrpmgr().equals(other.getGrpmgr()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getGrpdsc() == null ? other.getGrpdsc() == null : this.getGrpdsc().equals(other.getGrpdsc()))
            && (this.getGrplevel() == null ? other.getGrplevel() == null : this.getGrplevel().equals(other.getGrplevel()))
            && (this.getParentid() == null ? other.getParentid() == null : this.getParentid().equals(other.getParentid()))
            && (this.getTenantid() == null ? other.getTenantid() == null : this.getTenantid().equals(other.getTenantid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCrdt() == null ? other.getCrdt() == null : this.getCrdt().equals(other.getCrdt()))
            && (this.getCrusr() == null ? other.getCrusr() == null : this.getCrusr().equals(other.getCrusr()))
            && (this.getMddt() == null ? other.getMddt() == null : this.getMddt().equals(other.getMddt()))
            && (this.getMdusr() == null ? other.getMdusr() == null : this.getMdusr().equals(other.getMdusr()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGrpid() == null) ? 0 : getGrpid().hashCode());
        result = prime * result + ((getGrpname() == null) ? 0 : getGrpname().hashCode());
        result = prime * result + ((getGrpmgr() == null) ? 0 : getGrpmgr().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getGrpdsc() == null) ? 0 : getGrpdsc().hashCode());
        result = prime * result + ((getGrplevel() == null) ? 0 : getGrplevel().hashCode());
        result = prime * result + ((getParentid() == null) ? 0 : getParentid().hashCode());
        result = prime * result + ((getTenantid() == null) ? 0 : getTenantid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCrdt() == null) ? 0 : getCrdt().hashCode());
        result = prime * result + ((getCrusr() == null) ? 0 : getCrusr().hashCode());
        result = prime * result + ((getMddt() == null) ? 0 : getMddt().hashCode());
        result = prime * result + ((getMdusr() == null) ? 0 : getMdusr().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", grpid=").append(grpid);
        sb.append(", grpname=").append(grpname);
        sb.append(", grpmgr=").append(grpmgr);
        sb.append(", type=").append(type);
        sb.append(", grpdsc=").append(grpdsc);
        sb.append(", grplevel=").append(grplevel);
        sb.append(", parentid=").append(parentid);
        sb.append(", tenantid=").append(tenantid);
        sb.append(", status=").append(status);
        sb.append(", crdt=").append(crdt);
        sb.append(", crusr=").append(crusr);
        sb.append(", mddt=").append(mddt);
        sb.append(", mdusr=").append(mdusr);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}